package com.item.yxlottery.yxlottery.adapter;

/*
 *------------------------------
 * @创建者      Administrator
 * @创建时间    2017/1/6 10:46
 * @文件描述    市
 *------------------------------
 */

import com.alibaba.fastjson.JSONObject;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.item.yxlottery.yxlottery.R;

import java.util.List;

public class SelectorCityAdapter extends BaseQuickAdapter<JSONObject, BaseViewHolder> {

    public SelectorCityAdapter(int layoutResId, List<JSONObject> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, JSONObject item) {
        String areaName = item.getString("area_name");
        if (areaName.contains("市")) {
            areaName = areaName.substring(0, areaName.length()-1);
        }
        helper.setText(R.id.tv_item_selectorcity_city, areaName);

    }
}
